package com.jt.system.mapper;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.Map;

@Repository //用于描述数据层实现类对象
public class UserDaoImpl implements UserDao{
    @Autowired
    private SqlSessionTemplate sessionTemplate;

    public String selectUserByUsername(String username){
        String sql = "select from tb_user where username=?";
        Map<String,Object> map = new HashMap<>();

        return sessionTemplate.selectOne(sql);
    }
}
